import com.aop.Propagation.PropagationBehavior;
import com.batchOperation.Template.TemplateService;
import com.batchOperation.Template.model.BatchOperationTemplate;
import com.batchOperation.Template.model.BatchOperationTemplateContent;
import com.batchOperation.excel.model.Employee;
import com.batchOperation.excel.model.SchoolInfo;
import com.google.gson.Gson;
import com.workflowengine.WorkFlowService;
import com.workflowengine.config.NodeConfig;
import com.workflowengine.config.WorkFlowConfig;
import com.workflowengine.config.WorkFlowContent;
import com.workflowengine.event.workflowevent.*;
import com.workflowengine.event.workflowevent.events.NodeEndEvent;
import com.workflowengine.event.workflowevent.events.NodeStartEvent;
import com.workflowengine.event.workflowevent.events.WorkFlowEndEvent;
import com.workflowengine.event.workflowevent.events.WorkFlowStartEvent;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: wulongkai
 * @create: 2022-10-10 10:52
 **/
@SpringBootTest
public class javaStudyApplication {

    @Autowired
    private PropagationBehavior propagationBehavior;

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(javaStudyApplication.class, args);
        // TestService6 testService6 = applicationContext.getBean("testService6", TestService6.class);
        // System.out.println("testService6 = " + testService6);
        // System.out.println("AopUtils.isCglibProxy(testService6) = " + AopUtils.isCglibProxy(testService6));
        // TestService2 testService21 = testService6.getTestService2();
        // System.out.println("testService6.getTestService2() = " + testService21);
        // System.out.println("AopUtils.isCglibProxy(testService6.getTestService2()) = " + AopUtils.isCglibProxy(testService21));
        // Object target = AopTargetUtils.getTarget(testService21);
        // System.out.println("target = " + target);
        //
        //
        // TestService2 testService2 = applicationContext.getBean("testService2", TestService2.class);
        // System.out.println("testService2 = " + testService2);
        // System.out.println("AopUtils.isCglibProxy(testService2) = " + AopUtils.isCglibProxy(testService2));
        // System.out.println("testService2.getTestService1() = " + testService2.getTestService1());
        // System.out.println("AopUtils.isCglibProxy(testService2.getTestService1()) = " + AopUtils.isCglibProxy(testService2.getTestService1()));
        //
        // System.out.println("target == testService2 : " + (target == testService2));


    }

    @Test
    public void test() {
        propagationBehavior.requiredMethod1();
    }
}
